let getParamsDatas = (str)=>{
    var arr = str.split('?')

  if (arr.length == 2) {
      var data = arr[1].split('&')
      var obj = {}
      data.forEach(function (item) {
          var params = item.split('=')

          obj[params[0]] = params[1]
      })
      return {
          url: arr[0], //url
          data: obj    //参数
      }
  } else {
      return {
          url: arr[0], //无参数,
          data: {}
      }
  }
}
export{
    getParamsDatas,
}